<template>
  <div>
    <div class="sell-view">
      <div class="main-container">
        <el-tabs v-model="activeTabPane">
          <el-tab-pane :label="$t('tab.sell_btc')" name="btc">
            <div class="sell-box">
              <div class="detail">
                <p>賣價: NT$196,525.787350 帳戶餘額: 0.00000000 BTC</p>
              </div>
              <el-form label-position="top" :model="sellBTC">
                <el-row>
                  <el-col :span="11">
                    <el-form-item label="出售比特幣">
                      <el-input v-model="sellBTC.num" placeholder="0.00"><i slot="suffix">BTC</i></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="2" class="tc">
                    <el-form-item label="-">
                      <i class="el-icon-d-caret" style="transform:rotate(90deg); font-size: 20px;"></i>
                    </el-form-item>
                  </el-col>
                  <el-col :span="11">
                    <el-form-item label="收到新台幣">
                      <el-input v-model="sellBTC.value" placeholder="0"><i slot="suffix">USD</i></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-form-item size="large">
                  <el-button type="primary">出售比特币</el-button>
                </el-form-item>
              </el-form>
              <ul class="notes-list">
                <li>出售比特幣前，請先設定銀行帳號。</li>
                <li>每日售出上限：NT$500,000 (還可以售出NT$500,000)</li>
                <li>顯示金額為最後需支付之金額，無需支付其他手續費用給 MaiCoin</li>
              </ul>
            </div>
          </el-tab-pane>
          <el-tab-pane :label="$t('tab.sell_eth')" name="eth">
            <div class="sell-box">
              <div class="detail">
                <p>賣價: NT$12,233.940000  帳戶餘額: 0.00000000 ETH</p>
              </div>
              <el-form label-position="top" :model="sellBTC">
                <el-row>
                  <el-col :span="11">
                    <el-form-item label="出售以太幣">
                      <el-input v-model="sellBTC.num" placeholder="0.00"><i slot="suffix">BTC</i></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="2" class="tc">
                    <el-form-item label="-">
                      <i class="el-icon-d-caret" style="transform:rotate(90deg); font-size: 20px;"></i>
                    </el-form-item>
                  </el-col>
                  <el-col :span="11">
                    <el-form-item label="收到新台幣">
                      <el-input v-model="sellBTC.value" placeholder="0"><i slot="suffix">USD</i></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-form-item size="large">
                  <el-button type="primary">出售以太幣</el-button>
                </el-form-item>
              </el-form>
              <ul class="notes-list">
                <li>出售以太幣前，請先設定銀行帳號。</li>
                <li>每日售出上限：NT$500,000 (還可以售出NT$500,000)</li>
                <li>顯示金額為最後需支付之金額，無需支付其他手續費用給 MaiCoin</li>
              </ul>
            </div>
          </el-tab-pane>
          <el-tab-pane :label="$t('tab.sell_ltc')" name="ltc">
            <div class="sell-box">
              <div class="detail">
                <p>賣價: NT$3,278.010000  帳戶餘額: 0.00000000 LTC</p>
              </div>
              <el-form label-position="top" :model="sellBTC">
                <el-row>
                  <el-col :span="11">
                    <el-form-item label="出售萊特幣">
                      <el-input v-model="sellBTC.num" placeholder="0.00"><i slot="suffix">BTC</i></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="2" class="tc">
                    <el-form-item label="-">
                      <i class="el-icon-d-caret" style="transform:rotate(90deg); font-size: 20px;"></i>
                    </el-form-item>
                  </el-col>
                  <el-col :span="11">
                    <el-form-item label="收到新台幣">
                      <el-input v-model="sellBTC.value" placeholder="0"><i slot="suffix">USD</i></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-form-item size="large">
                  <el-button type="primary">出售萊特幣</el-button>
                </el-form-item>
              </el-form>
              <ul class="notes-list">
                <li>出售萊特幣前，請先設定銀行帳號。</li>
                <li>每日售出上限：NT$500,000 (還可以售出NT$500,000)</li>
                <li>顯示金額為最後需支付之金額，無需支付其他手續費用給 MaiCoin</li>
              </ul>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  data () {
    return {
      activeTabPane: this.$route.params.coin ? this.$route.params.coin : 'btc',
      sellBTC: {
        num: '',
        value: ''
      }
    }
  },
  computed: {
    ...mapState({
      path: state => state.route.path
    })
  },
  methods: {
  },
  watch: {
    path () {
      this.activeTabPane = this.$route.params.coin ? this.$route.params.coin : 'btc'
    }
  },
  created () {
  }
}
</script>

<style lang="less">
  .sell-view{
    .notes-list{
      padding-left: 15px;
      li{
        list-style: disc;
        font-size: 12px;
        line-height: 135%;
        color: #666;
        padding-bottom: 5px;
      }
    }
    .faq{
      margin: 30px 0;
      border-top: 1px dashed #ccc;
      padding-top: 30px;
      h4{
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 400;
      }
    }
    .sell-box{
      .detail{
        padding: 30px 0;
        border-bottom: 1px dashed #ccc;
        font-size: 14px;
      }
    }
  }
</style>
